package board.comment.action;

import java.sql.SQLException;

import com.opensymphony.xwork2.ActionSupport;

import board.comment.dao.CommentDao;

public class DeleteAction extends ActionSupport {
	private CommentDao dao;
	private int comment_no;
	private int currentPage;
	private int article_no;
	private int board_no;
	
	public DeleteAction() {
		dao = CommentDao.getInstance();
	}
	
	public String execute() throws SQLException {
		dao.delete(comment_no);
		dao.updateCountDOWN(article_no);
		return SUCCESS;
	}
	
	public int getComment_no() {
		return comment_no;
	}
	public void setComment_no(int comment_no) {
		this.comment_no = comment_no;
	}

	public int getCurrentPage() {
		return currentPage;
	}

	public void setCurrentPage(int currentPage) {
		this.currentPage = currentPage;
	}

	public int getArticle_no() {
		return article_no;
	}

	public void setArticle_no(int article_no) {
		this.article_no = article_no;
	}

	public int getBoard_no() {
		return board_no;
	}

	public void setBoard_no(int board_no) {
		this.board_no = board_no;
	}
}
